evaluate the composition of two functions